package com.lmf.springboot.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class MyController {

    @RequestMapping("/hello")
    public ModelAndView dosome(){
        ModelAndView mv=new ModelAndView();
        mv.addObject("msg","你好，世界");
        mv.setViewName("show");
        return mv;
    }
//    @RequestMapping("/hello2")
//    public ModelAndView dosome2(){
//        ModelAndView mv=new ModelAndView();
//        mv.addObject("msg","你好，世界");
//        mv.setViewName("show");
//        return mv;
//    }
}
